#include "sysfs.h"

#define MEMINFO "/proc/meminfo"


static void get_head(char *buf, )
{
}

static void get_data()
{
}

void minfo_save(char *log)
{
    static int fd = 0;
    char buf[4 * 1024] = {0};

    if (fd == 0) {
        fd = open(log, O_CREAT | O_TRUNC | O_RDWR);
        if (fd < 0)
            fatal("meminfo open log: %s", log);

        getstr(MEMINFO, buf, sizeof(buf));
    }

    getstr(MEMINFO, buf, sizeof(buf));

}

